package com.zephyr.vchcenter.test;

import com.zephyr.vchcenter.service.thread.ThreadManager;
import com.zephyr.vchcenter.service.thread.ThreadPoolManager;

public class StartServer implements Runnable {

	private String poolname;
	
	public StartServer(){
		this.poolname = "default";
	}
	
	public StartServer(String poolname){
		if (poolname == null || poolname == "") this.poolname = "default";
		else this.poolname = poolname;
	}
	
	public void run() {
		ThreadPoolManager tpm = ThreadPoolManager.getInstance();
		ThreadManager tm = tpm.getThreadManager(poolname);
		try {
			tm.server();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

}
